package com.rms.service.impl;

import java.util.List;

import com.rms.dao.IOrdersDao;
import com.rms.entity.Orders;
import com.rms.service.IOrdersService;
import com.rms.utils.PageBean;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class OrdersService implements IOrdersService{


	@Resource
	IOrdersDao ordersDao;

	@Override
	public void update(Orders orders) {
		ordersDao.update(orders);
	}

	@Override
	public List<Orders> query() {
		return ordersDao.query();
	}

	@Override
	public void add(Orders orders) {
		ordersDao.add(orders);
	}

	@Override
	public int getCount() {
		return ordersDao.getCount();
	}
	
	@Override
	public void getAll(PageBean<Orders> pb) {
		try {
			ordersDao.getAll(pb);
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
}
